package com.dongnao.network.netty_protobuf;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;


public class MyServerHandler extends SimpleChannelInboundHandler<studentPOJO.student> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, studentPOJO.student student) throws Exception {
        System.out.println(student.getName());
        System.out.println(student.getId());
    }

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        System.out.println("exceptionCaught");
        super.exceptionCaught(ctx, cause);
    }
}
